package com.fay.designPattern.reflector;

/**
 * @Title:
 * @Description:
 * @Author Fay Wang
 * @Date 2022/3/21 17:20
 * @Version 1.0
 */
public class Text {
    private String content;

    public Text(String content) {
        this.content = content;
    }

    /**
     * 将字符串转化为数字，忽略首尾空格
     * 如果字符串中包含除首尾空格之外的非数字字符，返回null
     * @return
     */
    public Integer toNumber() {
        if (content == null || content.isEmpty()) {
            return null;
        }
        // ...
        return null;
    }
}
